home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cnews004.zip / FF.ZIP / MAIN.H < prev    next >
Text File  |  1987-07-08  |  1KB  |  38 lines

  1. /*
  2.   MAIN.H - by Bill Mayne, Silver Spring, MD
  3.  
  4.       This header file generates the main() function declaration
  5.       and any of the standard arguments argc, argv, and envp.
  6.  
  7.       Dummy functions _setargv() and _setenvp() are generated to
  8.       save space in the .EXE file if these functions are not
  9.       needed by the program.
  10.  
  11.       The default is to generate only argc and argv.
  12.       You must generate envp if your program uses spawn() or exec().
  13.       To generate envp, specify "/DENVP" on the MSC command line.
  14.       To suppress generation of argc and argv, specify "/DNOARGS"
  15.       If options "/DENVP /DNOARGS" are both specified, the formal
  16.       arguments argc and argv are declared as place holders, but should
  17.       not be referenced as _setargv will be suppressed.
  18. */
  19.  
  20. #if !defined(ENVP)
  21. /* saves space if _setenvp() from the library is not needed */
  22. _setenvp() { }
  23. #endif
  24.  
  25. #if defined(NOARGS)
  26. /* saves space if _setargv() from the library is not needed */
  27. _setargv() { }
  28. #endif
  29.  
  30. main(
  31. #if defined(ENVP)
  32. argc,argv,envp) int argc; char *argv[]; char *envp[];
  33. #elif !defined(NOARGS)
  34. argc,argv) int argc; char *argv[];
  35. #else
  36. )
  37. #endif
  38.